<template>
  <div>
    <div class="my-body">
      <div class="ipt_a">
        <div style="float: left; line-height: 30px" class="tab_font-size">
          经销商：
        </div>
        <el-input
          v-model="input"
          placeholder="请输入内容"
          style="width: 150px; height: 50px; float: left"
        ></el-input>
      </div>
      <div class="ipt_a">
        <div style="float: left; line-height: 30px" class="tab_font-size">
          出库状态：
        </div>
        <el-select v-model="form.regiona" placeholder="" style="width: 100px">
          <el-option label="全部" value="0"></el-option>
          <el-option label="出货中" value="1"></el-option>
          <el-option label="待签收" value="2"></el-option>
          <el-option label="已签收" value="2"></el-option>
        </el-select>
      </div>
      <div class="ipt_b">
        <div style="float: left; line-height: 30px" class="tab_font-size">
          出库日期：
        </div>
        <el-date-picker v-model="value1" type="date" placeholder="选择日期">
        </el-date-picker>
      </div>

      <div style="margin-left: 10px">
        <el-button type="primary" plain>查询</el-button>
        <el-button>清空</el-button>
      </div>
      <div style="width: 100%; float: left">
        <div class="ipt_a">
          <div style="float: left; line-height: 30px" class="tab_font-size">
            医院地区：
          </div>
          <el-input
            v-model="input"
            placeholder="请输入内容"
            style="width: 150px; height: 50px; float: left"
          ></el-input>
        </div>
        <div class="ipt_a">
          <div style="float: left; line-height: 30px" class="tab_font-size">
            产品类型：
          </div>
          <el-select v-model="form.regionb" placeholder="" style="width: 100px">
            <el-option label="全部" value="0"></el-option>
            <el-option label="内部订单" value="1"></el-option>
            <el-option label="一般订单" value="2"></el-option>
            <el-option label="积分订单" value="3"></el-option>
            <el-option label="换货订单" value="4"></el-option>
            <el-option label="样品订单" value="5"></el-option>
            <el-option label="账期订单" value="6"></el-option>
          </el-select>
        </div>
      </div>

      <div>
        <div>
          <el-button type="danger" plain>删除订单</el-button>
        </div>
        <el-dialog
          title="老款产品出库扫描"
          :visible.sync="laokuan"
          width="50%"
          :before-close="handleClose"
        >
          <div style="width: 100%; height: 550px">
            <div style="width: 100%; float: left; height: 100px">
              <div>XXXXXXXXXXXXXX</div>
              <div>规格条码：未知</div>
              <div>产品序列：未知</div>
            </div>
            <div style="width: 100%; float: left">
              <template>
                <el-table
                  :data="
                    tableData.slice(
                      (currentPage - 1) * pageSize,
                      currentPage * pageSize
                    )
                  "
                  style="width: 100%"
                >
                  <el-table-column type="selection" width="55">
                  </el-table-column>
                  <el-table-column fixed prop="bianhao" label="产品规格">
                  </el-table-column>

                  <el-table-column prop="enddate" label="产品单价">
                  </el-table-column>
                  <el-table-column prop="name" label="产品数量">
                  </el-table-column>

                  <el-table-column prop="senddate" label="备注">
                  </el-table-column>
                </el-table>
                <el-pagination
                  @size-change="handleSizeChange"
                  @current-change="handleCurrentChange"
                  :current-page="currentPage"
                  :page-sizes="[5, 10]"
                  :page-size="pageSize"
                  :total="tableData.length"
                  layout="total, sizes, prev, pager, next, jumper"
                >
                </el-pagination>
              </template>
              <div>000/000件</div>
              <div style="margin-top: 30px">
                <el-button type="primary">产品出库提交</el-button>
                <el-button type="warning">放弃返回</el-button>
              </div>
            </div>
          </div>
        </el-dialog>
        <el-dialog
          title="添加积分申请"
          :visible.sync="dialogVisible"
          width="50%"
          :before-close="handleClose"
        >
          <div style="width: 100%">
            <el-form ref="form" :model="form" label-width="80px">
              <el-form-item label="出库申请编号">
                <el-input v-model="form.name" style="width: 200px"></el-input>
              </el-form-item>
              <el-form-item label="出库申请时间">
                <el-date-picker
                  v-model="value1"
                  type="date"
                  placeholder="选择日期"
                >
                </el-date-picker>
              </el-form-item>
              <el-form-item label="出库类型">
                <el-select v-model="form.region" placeholder="">
                  <el-option label="正常" value="shanghai"></el-option>
                  <el-option label="其他" value="shanghai"></el-option>
                </el-select>
              </el-form-item>

              <el-form-item label="生产批号">
                <el-input v-model="form.name" style="width: 200px"></el-input>
              </el-form-item>
              <el-form-item label="生产日期">
                <el-date-picker
                  v-model="value1"
                  type="date"
                  placeholder="选择日期"
                >
                </el-date-picker>
              </el-form-item>
              <el-form-item label="年份序列号">
                <el-input v-model="form.name" style="width: 50px"></el-input>
              </el-form-item>

              <el-form-item label="灭菌日期">
                <el-date-picker
                  v-model="value1"
                  type="date"
                  placeholder="选择日期"
                >
                </el-date-picker>
              </el-form-item>
              <div style="width: 200px">失效日期： 2027-10-09</div>
              <el-form-item label="灭菌箱编号">
                <el-select v-model="form.region" placeholder="">
                  <el-option label="正常" value="shanghai"></el-option>
                  <el-option label="其他" value="shanghai"></el-option>
                </el-select>
              </el-form-item>

              <el-form-item label="申请起始流水">
                <el-input v-model="form.name" style="width: 200px"></el-input>
                <el-button type="success" @click="dialogVisiblexiolie = true"
                  >产品类型</el-button
                >
              </el-form-item>

              <el-form-item label="产品编号">
                <el-select v-model="form.region" placeholder="">
                  <el-option label="正常" value="shanghai"></el-option>
                  <el-option label="其他" value="shanghai"></el-option>
                </el-select>
              </el-form-item>
            </el-form>
            <div>
              <el-button type="success" @click="diaxuanzhe = true" plain
                >添加产品明细</el-button
              >
              <el-button type="success" plain>删除产品明细</el-button>
              <el-button type="success" plain>清空出库明细</el-button>
            </div>

            <div style="width: 100%">
              <div style="width: 100%">
                <div>商采指标</div>
                <el-table
                  :data="
                    tableData.slice(
                      (currentPage - 1) * pageSize,
                      currentPage * pageSize
                    )
                  "
                  style="width: 100%"
                >
                  <el-table-column type="selection" width="55">
                  </el-table-column>
                  <el-table-column prop="bianhao" label="规格">
                  </el-table-column>
                  <el-table-column prop="senddate" label="出库数量">
                  </el-table-column>
                  <el-table-column prop="enddate" label="备注">
                  </el-table-column>
                </el-table>
              </div>
            </div>
            <div class="ipt_b">
              <div style="float: left; line-height: 30px">备注：</div>
              <el-input v-model="form.name" style="width: 200px"></el-input>
            </div>

            <div style="margin-top: 30px">
              <el-button type="primary">保存</el-button>
              <el-button type="warning"> 返回</el-button>
            </div>
          </div>
        </el-dialog>

        <el-dialog
          title="产品系列表"
          :visible.sync="dialogVisiblexiolie"
          width="30%"
          :before-close="handleClose"
        >
          <el-tree
            :data="data"
            :props="defaultProps"
            @node-click="handleNodeClick"
          ></el-tree>
          <div style="margin-top: 30px">
            <el-button type="primary">确认提交</el-button>
            <el-button type="warning">放弃返回</el-button>
          </div>
        </el-dialog>
        <el-dialog
          title="产品系列表"
          :visible.sync="diaxuanzhe"
          width="50%"
          :before-close="handleClose"
        >
          <div style="width: 100%; height: 550px">
            <div style="width: 50%; float: left">
              <el-tree
                :data="data"
                :props="defaultProps"
                @node-click="handleNodeClick"
              ></el-tree>
            </div>
            <div style="width: 50%; float: left">
              <template>
                <el-table
                  :data="
                    tableData.slice(
                      (currentPage - 1) * pageSize,
                      currentPage * pageSize
                    )
                  "
                  style="width: 100%"
                >
                  <el-table-column type="selection" width="55">
                  </el-table-column>
                  <el-table-column fixed prop="bianhao" label="产品规格">
                  </el-table-column>

                  <el-table-column prop="enddate" label="产品单价">
                  </el-table-column>
                  <el-table-column prop="name" label="产品数量">
                  </el-table-column>

                  <el-table-column prop="senddate" label="备注">
                  </el-table-column>
                </el-table>
                <el-pagination
                  @size-change="handleSizeChange"
                  @current-change="handleCurrentChange"
                  :current-page="currentPage"
                  :page-sizes="[5, 10]"
                  :page-size="pageSize"
                  :total="tableData.length"
                  layout="total, sizes, prev, pager, next, jumper"
                >
                </el-pagination>
              </template>
              <div style="margin-top: 30px">
                <el-button type="primary">确认提交</el-button>
                <el-button type="warning">放弃返回</el-button>
              </div>
            </div>
          </div>
        </el-dialog>
        <div style="margin-top: 30px; width: 100%; float: left">
          <div style="width: 100%; float: left">
            <template>
              <el-table
                :data="tableDatacklist"
                height="400"
                style="width: 100%"
                border
               :header-cell-style="{background:'#f5f7fa',color:'#606266'}"
                ref="singleTable"
                highlight-current-row
                @current-change="handleCurrentdx"
              >
                <el-table-column fixed prop="order_no" label="申请编号">
                </el-table-column>

                <el-table-column prop="order_type_txt" label="订单类型">
                </el-table-column>
                <el-table-column prop="create_time" label="日期">
                </el-table-column>
                <el-table-column prop="hospital_name" label="订货医院或地区">
                </el-table-column>
                <el-table-column prop="company_name" label="经销商">
                </el-table-column>
                <el-table-column prop="senddate" label="操作">
                  <el-button>物流发货</el-button>
                </el-table-column>
                <el-table-column prop="sh_name" label="收货人">
                </el-table-column>
                <el-table-column prop="sh_mobile" label="电话">
                </el-table-column>
                <el-table-column prop="sh_address_txt" label="收货地址">
                </el-table-column>
                <el-table-column prop="senddate" label="物流运单号">
                </el-table-column>
                <el-table-column prop="senddate" label="签字回单">
                  <div>无回单</div>
                </el-table-column>
                <el-table-column prop="senddate" label="实际收货日期">
                </el-table-column>
                <el-table-column prop="senddate" label="备注">
                </el-table-column>
              </el-table>
              <el-pagination
                @size-change="handleSizeChangea"
                @current-change="handleCurrentChangea"
                :current-page="currentPagea"
                :page-sizes="[5, 10]"
                :page-size="pageSizea"
                :total="total"
                layout="total, sizes, prev, pager, next, jumper"
              >
              </el-pagination>
            </template>
          </div>
        </div>
      </div>
    </div>
    <div class="my-body">
      <div>
        <div>
          <el-button type="success" @click="rukusaomiao = true" plain
            >出库条码-扫描</el-button
          >

          <el-button type="warning" plain>删除出库扫描</el-button>
          <el-button type="success" @click="rukumingxi = true" plain
            >出库单-打印</el-button
          >
          <span
            >出库信息:产品出库编号【RK11012409260003】系列-类型【TranAccurate心脏封堵器输送系统-L封堵器输送系统】生产批号【D240718】</span
          >
        </div>

        <el-dialog
          title="产品规格明细列表"
          :visible.sync="rukumingxi"
          width="50%"
          :before-close="handleClose"
        >
          <div style="width: 100%; height: 700px">
            <div style="width: 100%; height: 200px; float: left">
              <div style="font-weight: 600">显示信息</div>
              <el-radio-group v-model="form.resource">
                <el-radio label="隐藏单价"></el-radio>
                <el-radio label="隐藏收件人信息"></el-radio>
              </el-radio-group>
              <div>出库单头信息</div>
              <div class="ipt_b">
                <div style="float: left; line-height: 30px">出库日期：</div>
                <el-date-picker
                  v-model="value1"
                  type="date"
                  placeholder="选择日期"
                >
                </el-date-picker>
              </div>
              <div class="ipt_b">
                <div style="float: left; line-height: 30px">出库编号：</div>
                <el-input v-model="form.name" style="width: 200px"></el-input>
              </div>
              <div class="ipt_b">
                <div style="float: left; line-height: 30px">收货地址：</div>
                <el-input v-model="form.name" style="width: 200px"></el-input>
              </div>
              <div class="ipt_b">
                <div style="float: left; line-height: 30px">生产厂家：</div>
                <el-input v-model="form.name" style="width: 200px"></el-input>
              </div>
              <div class="ipt_b">
                <div style="float: left; line-height: 30px">收货单位：</div>
                <el-input v-model="form.name" style="width: 200px"></el-input>
              </div>
              <div class="ipt_b">
                <div style="float: left; line-height: 30px">收货人/电话：</div>
                <el-input v-model="form.name" style="width: 200px"></el-input>
              </div>
              <div class="ipt_b">
                <div style="float: left; line-height: 30px">生产厂家地址：</div>
                <el-input v-model="form.name" style="width: 200px"></el-input>
              </div>
              <div class="ipt_b">
                <div style="float: left; line-height: 30px">摘要：</div>
                <el-input v-model="form.name" style="width: 200px"></el-input>
              </div>
            </div>
            <div style="width: 100%; float: left">
              <el-button type="success">打印出库单</el-button>
            </div>
            <div style="width: 100%; height: 600px; float: left">
              <template>
                <el-table
                  :data="
                    tableData.slice(
                      (currentPage - 1) * pageSize,
                      currentPage * pageSize
                    )
                  "
                  style="width: 100%"
                >
                  <el-table-column type="selection" width="55">
                  </el-table-column>
                  <el-table-column fixed prop="bianhao" label="名称">
                  </el-table-column>

                  <el-table-column prop="enddate" label="型号规格">
                  </el-table-column>
                  <el-table-column prop="name" label="序列号">
                  </el-table-column>
                  <el-table-column prop="senddate" label="生产批号">
                  </el-table-column>
                  <el-table-column prop="senddate" label="灭菌批号">
                  </el-table-column>
                  <el-table-column prop="senddate" label="注册证号">
                  </el-table-column>
                  <el-table-column prop="senddate" label="生产许可证号">
                  </el-table-column>
                  <el-table-column prop="senddate" label="储运条件">
                  </el-table-column>

                  <el-table-column prop="senddate" label="生产日期">
                  </el-table-column>
                  <el-table-column prop="senddate" label="有效期限">
                  </el-table-column>
                  <el-table-column prop="senddate" label="单位">
                  </el-table-column>
                  <el-table-column prop="senddate" label="数量">
                  </el-table-column>
                  <el-table-column prop="senddate" label="备注">
                  </el-table-column>
                </el-table>
                <el-pagination
                  @size-change="handleSizeChange"
                  @current-change="handleCurrentChange"
                  :current-page="currentPage"
                  :page-sizes="[5, 10]"
                  :page-size="pageSize"
                  :total="tableData.length"
                  layout="total, sizes, prev, pager, next, jumper"
                >
                </el-pagination>
              </template>
            </div>
          </div>
        </el-dialog>
        <el-dialog
          title="产品出库扫描"
          :visible.sync="rukusaomiao"
          width="50%"
          :before-close="handleClose"
        >
          <div style="width: 100%; height: 700px">
            <div>
              当前产品出库信息：产品出库编号【DH0051564602059】 产品去向
              【HT152162365】
            </div>

            <div style="width: 50%; float: left">
              <div style="font-weight: 600; margin-top: 10px">扫描信息</div>
              <!-- <div>
                <el-tree
                  class="filter-tree"
                  :data="data"
                  :props="defaultProps"
                  default-expand-all
                  :filter-node-method="filterNode"
                  ref="tree"
                >
                </el-tree>
              </div> -->
              <div style="font-weight: 600; padding: 20px 0; margin-top: 50px">
                合计
              </div>
              <template>
                <el-table
                  :data="
                    tableDatackli.slice(
                      (currentPage - 1) * pageSize,
                      currentPage * pageSize
                    )
                  "
                  border
                  style="width: 100%"
                >
                  <el-table-column fixed prop="bianhao" label="序号">
                  </el-table-column>

                  <el-table-column
                    prop="specification_number"
                    label="类型(规格)"
                  >
                  </el-table-column>
                  <el-table-column prop="count" label="申请数量">
                  </el-table-column>

                  <el-table-column prop="real_ck_count" label="出库数量">
                  </el-table-column>
                  <el-table-column prop="senddate" label="扫描数量">
                    <div>0</div>
                  </el-table-column>
                </el-table>
                <el-pagination
                  @size-change="handleSizeChange"
                  @current-change="handleCurrentChange"
                  :current-page="currentPage"
                  :page-sizes="[5, 10]"
                  :page-size="pageSize"
                  :total="tableData.length"
                  layout="total, sizes, prev, pager, next, jumper"
                >
                </el-pagination>
              </template>
            </div>
            <div style="width: 50%; float: left">
              <div style="font-weight: 600; padding: 20px 0">产品条码</div>
              <div style="width: 100%; height: 50px; text-align: center">
                <el-input
                  autofocus
                  v-model="ipt_sm"
                  ref="inputField"
                  type="text"
                  @input="inputnr"
                  @blur="blur"
                  @clear="clear"
                ></el-input>
              </div>
              <div>规格条码：未知</div>
              <div>
                产品序列：未知
                <el-button type="primary" @click="dianji">开始扫描</el-button>
              </div>

              <template>
                <el-table
                  :data="
                    smlist.slice(
                      (currentPage - 1) * pageSize,
                      currentPage * pageSize
                    )
                  "
                  border
                  style="width: 100%"
                >
                  <el-table-column fixed prop="product_specifications_id" label="序号" width="50">
                  </el-table-column>

                  <el-table-column prop="bar_code_real" label="条码" width="500">
                  </el-table-column>
                  <el-table-column prop="specification_number" label="类型(规格)" width="100">
                  </el-table-column>

                  <!-- <el-table-column prop="senddate" label="状态">
                     <div>待提交</div>
                  </el-table-column>
                  <el-table-column prop="senddate" label="出库数量">
                      <div>1</div>
                  </el-table-column> -->
                </el-table>
                <el-pagination
                  @size-change="handleSizeChange"
                  @current-change="handleCurrentChange"
                  :current-page="currentPage"
                  :page-sizes="[5, 10]"
                  :page-size="pageSize"
                  :total="tableData.length"
                  layout="total, sizes, prev, pager, next, jumper"
                >
                </el-pagination>
              </template>
              <div style="margin-top: 30px">
                <el-button type="primary" @click="cpchuku">产品出库库提交</el-button>
                <el-button type="warning">放弃返回</el-button>
              </div>
            </div>
          </div>
        </el-dialog>
        <div style="margin-top: 30px; width: 100%; float: left">
          <div style="width: 100%; float: left">
            <template>
              <el-table
                :data="tableDatackli"
                style="width: 100%"
                border
               :header-cell-style="{background:'#f5f7fa',color:'#606266'}"
              >
                <el-table-column type="selection" width="55"> </el-table-column>
                <el-table-column
                  fixed
                  prop="product_type_pname"
                  label="产品系列"
                >
                </el-table-column>

                <el-table-column prop="product_type_name" label="产品类型">
                </el-table-column>
                <el-table-column prop="specification_number" label="产品规格">
                </el-table-column>
                <el-table-column prop="senddate" label="单价">
                </el-table-column>
                <el-table-column prop="count" label="订货数量">
                </el-table-column>
                <el-table-column prop="real_ck_count" label="实际出货数量">
                </el-table-column>
                <el-table-column prop="remark" label="产品备注">
                </el-table-column>
                <!-- <el-table-column prop="senddate" label="已入库数量">
                </el-table-column>
                <el-table-column prop="senddate" label="条码发行">
                </el-table-column>
                <el-table-column prop="senddate" label="条码打印">
                  <el-button>打印</el-button>
                </el-table-column>
                <el-table-column prop="senddate" label="备注">
                </el-table-column> -->
              </el-table>
              <!-- <el-pagination
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="currentPage"
                :page-sizes="[5, 10]"
                :page-size="pageSize"
                :total="tableData.length"
                layout="total, sizes, prev, pager, next, jumper"
              >
              </el-pagination> -->
            </template>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { getData, postData, request } from "@/utils/request.js";
export default {
  data() {
    return {
      key: 1, // 为了能每次切换权限的时候重新初始化指令
      valuesj: 2024,
      dialogVisiblexiolie: false,
      diaxuanzhe: false,
      rukusaomiao: false,
      laokuan: false,
      rukumingxi: false,
      options: [
        {
          value: "1",
          label: "全部",
        },
        {
          value: "2",
          label: "已签收",
        },
        {
          value: "3",
          label: "未签收",
        },
      ],
      data: [
        {
          label: "中国大陆",
          children: [
            {
              label: "上海",
            },
            {
              label: "北京",
            },
            {
              label: "四川",
            },
          ],
        },
      ],
      value1: "",
      defaultProps: {
        children: "children",
        label: "label",
      },
      value: "",
      chanpingguige: false,
      dialogVisible: false,
      dialogVisiblea: false,
      hospital: false,
      area: false,
      currentPagea: 1,
      pageSizea: 10,
      currentPage: 1,
      pageSize: 10,
      jinxiaoshang: false,
      shouhuor: false,
      diquxuanzhe: false,
      tableData: [],
      tableDatacklist: [],
      tableDatackli: [],
      form: {
        name: "",
        regiona: "",
        regionb: "",
        regionc: "",
        regiond: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
        regioB: "",
        regioA: "",
      },
      sizeForm: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
      },
      total: "",
      input: "",
      tablicpxl: [],
      ipt_sm: "",
      smlist:[],
      order_id:"",
    };
  },
  created() {
    this.ckList();
  },
  methods: {
    cpchuku(){
      if(this.smlist.length == 0){
        this.$message({
              message: "您还没有扫码添加出库",
              type: "warning",
            });
      }else{
        var data = {
          order_id:this.order_id,
        barcode_content: JSON.stringify(this.smlist) , 
        token: localStorage.getItem("token"),
      };
      postData("godown.log/addCkProduct", data).then((res) => {
        console.log(res, 1111111);
       
      });
      }
     
     
    },
   
    blur() {},
    inputnr() {
      console.log(this.ipt_sm);
      localStorage.setItem("tiaomaxinxi", this.ipt_sm);
      setTimeout(() => {
        this.ipt_sm = "";
        if (this.ipt_sm == "") {
          this.shaomaduima();
        } else {
        }
      }, 1000);
    },
    shaomaduima() {
      var data = {
        barcode: localStorage.getItem("tiaomaxinxi"),
        token: localStorage.getItem("token"),
      };
      postData("godown.log/barCodeGetProduct", data).then((res) => {
        console.log(res, 6666666);
        var pdid = this.tableDatackli.find(item=> item.product_specifications_id === res.product_specifications_id)
        var nemr = this.tableDatackli.find(
          (item) => item.specification_number === res.specification_number
        );
        if (pdid == undefined) {
          this.$message({
              message: "扫描的条码跟当前产品不一致",
              type: "warning",
            });
        } else {
          if (nemr == undefined) {
            this.$message({
              message: "扫描的条码跟当前产品不一致",
              type: "warning",
            });
          } else {
            if( pdid.real_ck_count == pdid.count) {
             
             
            }else{
              pdid.real_ck_count ++ 
              this.smlist.push(res.data)
            } 
           
         
          }
         
        }
      });
    },
    dianji() {
      this.$nextTick(() => {
        this.$refs.inputField.focus();
      });
    },
    handleNodeClick(val) {},
    //产品系列
    cprkxil() {
      var data = {
        token: localStorage.getItem("token"),
      };
      postData("product.type/indexlist", data).then((res) => {
        console.log(res, 6666666);
        this.tablicpxl = res.data;
      });
    },

    handleCurrentdx(val) {
      console.log(val);
      this.order_id = val.id
      this.tableDatackli = [];
      var data = {
        order_id: val.id,
        token: localStorage.getItem("token"),
      };
      postData("order/getOrderInfo", data).then((res) => {
        console.log(res, 6666666);
        this.tableDatackli = res.data;
      });
    },
    //出库列表
    ckList() {
      var data = {
        page: this.currentPagea,
        limit: this.pageSizea,
        token: localStorage.getItem("token"),
      };
      postData("godown.log/ckList", data).then((res) => {
        console.log(res, 6666666);
        this.tableDatacklist = res.data.data;
        this.total = res.data.total;
        this.ckCurrent();
      });
    },
    //出库列表默认选中第一条
    ckCurrent() {
      this.$refs.singleTable.setCurrentRow(this.tableDatacklist[0]);
    },
    onSubmit() {
      console.log("submit!");
    },
    handleClose(done) {
      done();
      // this.$confirm('确认关闭？')
      // 	.then(_ => {
      // 		done();
      // 	})
      // 	.catch(_ => {});
    },

    handleClick(row) {
      console.log(row);
    },
    handleSizeChangea(val) {
      this.pageSizea = val;
      this.ckList();
    },
    handleCurrentChangea(val) {
      this.currentPagea = val;
      this.ckList();
    },
    handleSizeChange(val) {
      this.pageSize = val;
    },
    handleCurrentChange(val) {
      this.currentPage = val;
    },
  },
};
</script>

<style lang="scss" scoped>
.ipt_a {
  width: 240px;
  height: 50px;
  float: left;
}

.ipt_aa {
  width: 400px;
  height: 50px;
  float: left;
}

.ipt_b {
  width: 300px;
  height: 50px;
  float: left;
}

.listdizhi {
  width: 100%;
  height: 100px;
  float: left;
  border-bottom: 1px solid;
}

.lie {
  width: 90%;
  height: 100%;
  float: left;
}

.listdizhia {
  width: 100%;
  height: 50px;
  float: left;
}

.listdizhia div {
  float: left;
  margin-left: 30px;
}
</style>